<template>
  <el-row class="module-inner">
    <el-col v-for="item in list" :key="item" :span="6" class="flex-center">
      <div class="item">
        <div class="num text-center">{{ getValByName(item) }}</div>
        <div class="name flex-center">{{ item }}</div>
      </div>
    </el-col>
  </el-row>
</template>

<script>
export default {
  name: 'CountNum',
  components: {},
  props: {
    moduleData: {
      type: Array,
      default: () => ([])
    }
  },
  data() {
    return {
      list: ['服务网点', '技术人员', '备件仓', '响应时间']
    }
  },
  methods: {
    getValByName(name) {
      const item = this.moduleData.find(el => el.name === name)
      return item ? item.value : ''
    }
  }
}
</script>

<style lang='scss' scoped>
@import "src/styles/conversion.scss";

.module-inner {
  width: 100%;
}

.item {
  color: #fff;

  .num {
    width: px2vw(185);
    height: px2vw(142);
    line-height: px2vw(100);
    font-size: px2vw(36);
    font-weight: 800;
    background: url('/image/download-4.png') no-repeat center;
    background-size: 100% 100%;
  }

  .name {
    height: px2vw(30);
    font-size: px2vw(20);
    font-weight: 800;
    margin-top: px2vw(-10);
  }
}
</style>
